package com.example.distribued.lock.service;

import com.example.distribued.lock.pojo.Stock;
import org.springframework.stereotype.Service;

/**
 * @author ash
 * @description
 * @create 2024/4/1  20:46:58
 * @className StockService
 * @verson 1.0.0
 */
@Service
public class StockService {

    private Stock stock = new Stock();

    public void deduct() {
        stock.setStockCount(stock.getStockCount() - 1);
        System.out.println("当前库存:"  + stock.getStockCount());
    }
}
